/*
 * SystemStyle.java  0.4.0 / Oct 25, 2010
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
package com.cute4j.swing.styles;

import com.cute4j.swing.Swing;

/**
 * System Style.
 *
 * @cute4j.native
 *    generate="header"
 *
 * @author Slobodan Vrkacevic
 * @version 0.4.0
 */
public final class SystemStyle extends AbstractStyle {

// Public Static Fields. -------------------------------------------------------

  /**
   * System style name.
   */
  public static final String STYLE_NAME;

  /**
   * System style description.
   */
  public static final String STYLE_DESCRIPTION;

// Static Initialization. ------------------------------------------------------

  static {
    Swing.initialize();
    STYLE_NAME = _getSystemStyleName();
    STYLE_DESCRIPTION = _getSystemStyleDescription();
  }

// Private Fields. -------------------------------------------------------------

  private final boolean platformStyle;

// Public Constructors. --------------------------------------------------------

  /**
   * Constructs new SystemStyle object.
   */
  public SystemStyle() {
    super(STYLE_NAME, STYLE_DESCRIPTION, new SystemTheme());
    platformStyle = true;
  }

// Package-Private Constructors. -----------------------------------------------

  SystemStyle(String name, String description, boolean platformStyle) {
    super(name, description, new SystemTheme(name));
    this.platformStyle = platformStyle;
  }

// Overridden Methods. ---------------------------------------------------------

  /**
   * {@inheritDoc}
   */
  public boolean isSupported() {
    return true;
  }

  /**
   * {@inheritDoc}
   */
  public boolean isPlatformStyle() {
    return platformStyle;
  }

// Private Static Native Method. -----------------------------------------------

  private static native String _getSystemStyleName();

  private static native String _getSystemStyleDescription();

}
